#include "mainwindow.h"
#include <QApplication>
#include <QtSingleApplication>
#include <QMessageBox>
#include <QtDebug>


int main(int argc, char *argv[])
{
    #if (QT_VERSION >= QT_VERSION_CHECK(5,6,0))
        QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    #endif
    QtSingleApplication a(QLatin1String("123456"), argc, argv);
    if (a.isRunning())
    {
        QMessageBox::information(NULL, "Reminder",
                                 "你已经启动了Reminder",
                         QMessageBox::Ok);
        a.sendMessage("raise_window_noop");
        return EXIT_SUCCESS;
    }

    MainWindow w;
    // w.show();
    return a.exec();
}
